#include <iostream>

class Person
{
public:
    int age;
    std::string name;
    int score;
    std::string gender;

    Person() : age(999), name("哈哈哈哈"), score(999), gender("第三方") // 构造函数初始化列表
    {
    }
    Person(int a, std::string n, int s, std::string g)
    {
        age = a;
        name = n;
        score = s;
        gender = g;
    }

    Person(int a, std::string n, int s) : age(a), name(n), score(s) {}                    // 构造函数初始化列表
    Person(int age, std::string name) : age(age), name(name), score(100), gender("男") {} // 构造函数初始化列表
};

void print_person(Person p)
{
    std::cout << "*****************" << std::endl;
    std::cout << "姓名\t" << p.name << std::endl;
    std::cout << "年龄\t" << p.age << std::endl;
    std::cout << "分数\t" << p.score << std::endl;
    std::cout << "性别\t" << p.gender << std::endl;
}

int main(int argc, char const *argv[])
{
    
    Person p1 = Person();
    Person p2 = Person(12, "小明");
    Person p3 = Person(10, "如来佛祖", 99);
    Person p4 = Person(100, "一挥而就", 98, "女");

    print_person(p1);
    print_person(p2);
    print_person(p3);
    print_person(p4);

    return 0;
}
